package com.example.common;

import com.example.vo.ResultVO;

public class ResultUtil {

    public static <T> ResultVO success(T data){
        ResultVO vo = new ResultVO(1,"成功");
        vo.setData(data);
        return vo;
    }

    public static <T> ResultVO success(){
        ResultVO vo = new ResultVO(1,"成功");
        vo.setData(null);
        return vo;
    }

    public static <T> ResultVO error(){
        ResultVO vo = new ResultVO(0,"失败");
        return vo;
    }
}
